package com.base;

import java.util.HashMap;
import java.util.Map;

/**
 * HashSet是哈希集合，add添加（重复无效），contains判断是否存在
 */
public class 哈希表 {
    public static void main(String[] args) {
        HashMap<Integer,Integer> hm= new HashMap();
        hm.put(0,1);
        hm.put(0,hm.get(0)+1);
        hm.put(33,555);
        for (Map.Entry<Integer, Integer> entry : hm.entrySet()) {
            System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
        }
    }
}
